<?
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
?>
<? // <div  background-image:url('/_commonint/themes/light_2006/images/app_options_bg.gif'); ?>
<div id="theme_treeview" style="position: absolute; background: #fff; border-right: 1px solid #333; overflow-x: hidden;


<?

if ($_COOKIE["theme_treeview"] == "hidden")
{
    echo "display: none;"; 
}


?>
">

<?
foreach ($App->aOptionHeaders as $sHeaderID => $aHeaderVals)
{
    if ($_COOKIE["theme_app_option_list_".$sHeaderID] == "hidden")
    {
        $sAppOptionImg=THEME_DIR."/images/app_options_show_arrow.gif";
    }
    else
    {
        $sAppOptionImg=THEME_DIR."/images/app_options_hide_arrow.gif";
    }
    // background-image:url('/_commonvgh/themes/light_2006/images/app_options_header_bg.gif');
    ?>

<table id="treeview_table" cellspacing="0" style="width: 230px; height: 20px; border: 0;  color: #000; background-image:url('/_commonvgh/themes/light_2006/images/app_options_header_bg.gif');  font-size: 8pt; font-family: Arial; border-bottom: 1px solid #999; margin-top: 13px;">
<tr>

<td style="width: 21px; vertical-align: middle; text-align: center;" 

    <?
    if (!$aHeaderVals["bNoHide"])
    {
        ?>
        onclick="theme_ToggleAppOptionList('<?=$sHeaderID;?>');" onmouseover="this.className='theme_app_options_hover';" onmouseout="this.className='';"
        <?
    }
    ?>
        >
    <?
    if (!$aHeaderVals["bNoHide"])
    {
        ?>
        <img src="<?=$sAppOptionImg;?>" id="theme_app_option_list_img_<?=$sHeaderID;?>">
        <?
    }
    else
    {
        ?>
        &nbsp;
        <?
    }
    ?>
</td>

    <td style="vertical-align: middle;color: #4D6480; padding-left: 6px;" nowrap>
        <b><?=$aHeaderVals["sCaption"];?></b>
    </td>

</tr>
</table>


<div style="background-image:url('<?=THEME_DIR;?>/images/app_options_left.gif'); padding-top: 1px; padding-bottom: 1px; border-bottom: 1px solid #82A4CC;

<?
if ($_COOKIE["theme_app_option_list_".$sHeaderID] == "hidden")
{
    echo "display: none; ";
}
?>

padding-left: 1px; " id="theme_app_option_list_<?=$sHeaderID;?>">

<?
if (is_array($App->aOptions))
{
    foreach ($App->aOptions as $sID => $aVals)
    {
        if ($aVals["sParent"]==$sHeaderID)
        {
            switch ($aVals["nType"])
            {
                case 2:
                    ?>
                    <div style="margin: 3px 0 0 27px; padding-bottom: 3px; border-top: 1px solid #ccc; width: 197px;">
                        <!-- -->
                    </div>
                    <?
                    break;
                
                case 3:
                    ?>
                    <div style="margin: 2px 0 2px 28px;">
                    <table style="border: 0; padding: 0; width: 197px; " cellpadding="0" cellspacing="0">
                        <tr>
                            <td width="1%" nowrap style="color: #4D6480; font-size: 8pt;">
                                <?=$aVals["sCaption"];?>
                            </td>
                            
                            <td style="padding-left: 5px;">
                                <input type="text" style="color: #4D6480; font-size: 8pt; width: 95%; padding: 0;" onkeypress="javascript:if(event.keyCode==13){<?=$aVals["sAction"];?>};">
                            </td>
                        </tr>
                    </table>
                    </div>
                    <?
                    break;
                
                default:
                    
                    ?>
                
                    <a href="<?=$aVals["sAction"];?>" style="color: #4D6480; font-size: 8pt;">
                        <?
                        if ($aVals["sImage"])
                        {
                            ?>
                            <img src="<?=CD_COMMON_2006;?>/icons/<?=$aVals["sImage"];?>" style="margin-right: 6px;">
                            <?
                        }
                        else
                        {
                            ?>
                            <img src="<?=CD_COMMON_2006;?>/icons/blank.gif"  style="margin-right: 6px;">
                            <?
                        }
                        ?>
                            
                        <?=$aVals["sCaption"];?>
                        
                    </a>
                    <?
                    break;
            }
        }
    }
}
?>

</div>
<?
}
?>



</div>

